package com.lxf.cloudorder.mapper;

import com.lxf.cloudorder.bean.OrderBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 罗兴发
 * @data 2025/5/8 17:50
 * @description：订单持久层
 */
@Mapper
public interface OrderMapper {
    int addOrder(@Param("list") List<OrderBean> list);

    List<OrderBean> getOrderByUserId(@Param("userId") Integer userId,
                                     @Param("startPage") Integer startPage,
                                     @Param("size") Integer size);

    int updateProductNumByCode(@Param("pCode") String pCode,
                               @Param("pNum") Integer pNum);

    Integer getOrderCountByUserId(@Param("userId") Integer userId);
}
